//
//  KaagadPesoDef.h
//  Kaagad Peso
//
//  Created by ZhengChengFeng on 2024/10/15.
//

#import <Foundation/Foundation.h>

extern float DimensionBaseIphone6(float aHeight);

#define kNotificationLoginSucess      @"kNotificationLoginSucess"
#define kNotificationLogoutSucess     @"kNotificationLogoutSucess"

#define kNotificationHideAlertView    @"kNotificationHideAlertView"
#define kNotificationTabBarNum        @"kNotificationTabBarNum"

#define kNeedToRefreshOrderListPage   @"kNeedToRefreshOrderListPage"
#define kRecordBtnNum                 @"kRecordBtnNum"


#define singleton_interface(className) + (className *)shared##className;

#define singleton_implementation(className) \
static id  _instance;  \
+ (id)shared##className  \
{   \
if (_instance == nil) { \
_instance = [[self alloc] init];    \
}   \
return _instance;   \
}   \
+ (id)allocWithZone:(struct _NSZone *)zone  \
{   \
static dispatch_once_t once;    \
dispatch_once(&once, ^{ \
_instance = [super allocWithZone:zone]; \
}); \
return _instance;   \
}


#define kAppLanguage @"AppLanguage"
#define ASLocalizedString(key) [NSString stringWithFormat:@"%@", [[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@",[[NSUserDefaults standardUserDefaults] objectForKey:kAppLanguage]] ofType:@"lproj"]] localizedStringForKey:(key) value:nil table:@"Localizable"]]


#define kScreenWidth      [UIScreen mainScreen].bounds.size.width

#define kScreenHeight     [UIScreen mainScreen].bounds.size.height

#define IS_IPhoneX_All (kScreenHeight == 812.f || kScreenHeight == 844.f || kScreenHeight == 896.f || kScreenHeight == 926.f || kScreenHeight == 932.f || kScreenHeight == 852.f)

#define kHeight_StatusBar [NSObject vg_statusBarHeight]

#define kHeight_NavBar 44.0f

#define kNavigationBarHeight  (kHeight_StatusBar + kHeight_NavBar)

#define kHeight_TabBar (IS_IPhoneX_All ? 83.0f:49.0f)

#define kHeight_BottomSafe (IS_IPhoneX_All? 34.0f:0.0f)

#define kGeneralHeight    44.0

#define PMStringIsEmpty(str) ([str isKindOfClass:[NSNull class]] || str == nil || [str length] == 0 || [[str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet] ] length] == 0 )


#define PMObjectIsEmpty(_object) (_object == nil \
|| [_object isKindOfClass:[NSNull class]] \
|| ([_object respondsToSelector:@selector(length)] && [(NSData *)_object length] == 0) \
|| ([_object respondsToSelector:@selector(count)] && [(NSArray *)_object count] == 0))


#define kWeakSelf __weak typeof (self) weakSelf = self;
#define kStrongSelf __strong __typeof(&*weakSelf)strongSelf = weakSelf;
#define kWeakObj(obj)  __weak typeof(obj) weakObj = obj;
#define __es_weak        __weak
#define es_weak_property weak

#define ESWeak(var, weakVar) __weak __typeof(&*var) weakVar = var
#define ESStrong_DoNotCheckNil(weakVar, _var) __typeof(&*weakVar) _var = weakVar
#define ESStrong(weakVar, _var) ESStrong_DoNotCheckNil(weakVar, _var); if (!_var) return;

#define ESWeak_(var) ESWeak(var, weak_##var);
#define ESStrong_(var) ESStrong(weak_##var, _##var);

#define ESWeakSelf      ESWeak(self, __weakSelf);

#define ESStrongSelf    ESStrong(__weakSelf, _self);

//#define RGB(r, g, b)               [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1.0f]
//#define RGBA(r, g, b, a)           [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:a]

//#define kArcRandomColor            [UIColor colorWithRed:arc4random() %255 /255.0f green:arc4random() %255 /255.0f blue:arc4random() %255 /255.0f alpha:1.0f]
 
#define kButtonDefaultColor         [UIColor colorWithHexString:@"#281FE4"]
#define kTableViewBackColor         [UIColor colorWithHexString:@"#F7F7F7"]
#define kLineColor                  [UIColor colorWithHexString:@"#F1F3F2"]
#define kBlackColor                 [UIColor colorWithHexString:@"#010101 "]
#define kWhiteColor                 [UIColor colorWithHexString:@"#FFFFFF "]

#define kShadowViewColor            [UIColor colorWithHexString:@"#000000" alpha:0.75f]

typedef void (^VoidBlock)(void);

#define kTabBarCustomeHeight        DimensionBaseIphone6(49)

#define kCurrentLanguageCode        @"kCurrentLanguageCode"

#define kUserTelPhone               @"kUserTelPhone"

#define kFuturaMedium               @"Futura-Medium"
#define kFuturaMediumItalic         @"Futura-MediumItalic"
#define kFuturaBold                 @"Futura-Bold"
#define kFuturaCondensedMedium      @"Futura-CondensedMedium"
#define kFuturaCondensedExtraBold   @"Futura-CondensedExtraBold"
#define kFuturaBTMedium             @"FuturaBT-Medium"
#define kFuturaBTBook               @"FuturaBT-Book"
#define kFuturaBT                   @"FuturaBT"
#define kFutura                     @"Futura"

#define kGeometricBT                @"Geometric415BT"

#define kRecordLoginStartTime       @"kRecordLoginStartTime"
#define kRecordLoginEndTime         @"kRecordLoginEndTime"


#define kIsNeedLocation             @"kIsNeedLocation"

#define kScheme                     @"da://na.kred.it"

#define kIsJumpAppHome              [NSString stringWithFormat:@"%@%@",kScheme,@"/erosynthesis"]

#define kIsJumpAppLogin             [NSString stringWithFormat:@"%@%@",kScheme,@"/philomeld"]

#define kIsJumpAppOrderList         [NSString stringWithFormat:@"%@%@",kScheme,@"/passionarity"]

#define kIsJumpAppOrderDetail       [NSString stringWithFormat:@"%@%@",kScheme,@"/smartphonics"]

#define kDefaultTabBarFixHeight     (IS_IPhoneX_All ? 0 : 25)

#define kHomeIDFA                   @"kHomeIDFA"
#define kLoginIDFA                  @"kLoginIDFA"

#define kCityDataAry                @"kCityDataAry"


#define kChopped                    @"chopped"
#define kCertainly                  @"certainly"
#define kDirty                      @"dirty"
#define kThat                       @"that"
#define kSent                       @"sent"


#define kIdCardInfoVertify          @"opposing"
#define kPersonInfoVertify          @"fully"
#define kContactInfoVertify         @"armed"
#define kBankInfoVertify            @"might"


#define kProvender                  @"provender"
#define kKeller                     @"Keller"
#define kBeen                       @"been"


#define kIDFAStr          @"kIDFAStr"

#define kStoreLongitude   @"kStoreLongitude"
#define kStoreLatitude    @"kStoreLatitude"



